﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace F2S.LINQ2LinkedIn.Model
{
    [XmlRoot("update-action")]
    public class UpdateAction : UpdateItem
    {
        [XmlElement("action")]
        public Action Action { get; set; }

        [XmlElement("original-update")]
        public Update OriginalUpdate { get; set; }
    }

    /*
      <update-action>
        <action>
          <code>COMMENT</code>
        </action>
        <original-update>
          <timestamp>1380283166083</timestamp>
          <update-key>UNIU-177805-5789327204634591232-SHARE</update-key>
          <update-type>SHAR</update-type>
          <update-content>
            <person>
              <id>BPEbxfpM2R</id>
              <first-name>Sanjeev</first-name>
              <last-name>Kumar</last-name>
              <headline>Software Product Executive</headline>
              <current-share>
                <id>s5789327456414466048</id>
                <timestamp>1380283166083</timestamp>
                <visibility>
                  <code>anyone</code>
                </visibility>
                <comment>Worth a close look if you are serious about being an influential product manager.</comment>
                <content>
                  <submitted-url>http://image-store.slidesharecdn.com/6d2c86d2-276a-11e3-982a-22000aa5108a-large.png</submitted-url>
                  <shortened-url>http://lnkd.in/bYZP42C</shortened-url>
                  <title>title-card.png</title>
                  <submitted-image-url>http://image-store.slidesharecdn.com/6d2c86d2-276a-11e3-982a-22000aa5108a-large.png</submitted-image-url>
                  <thumbnail-url>https://media.licdn.com/media-proxy/ext?w=80&amp;h=100&amp;hash=2KvDyHf0Q8ei%2FUeCANrU5FPDV7A%3D&amp;url=http%3A%2F%2Fimage-store.slidesharecdn.com%2F6d2c86d2-276a-11e3-982a-22000aa5108a-large.png</thumbnail-url>
                  <eyebrow-url>http://www.linkedin.com/share?viewLink=&amp;sid=s5789327456414466048&amp;url=http%3A%2F%2Flnkd%2Ein%2FbYZP42C&amp;urlhash=TBX2&amp;uid=5789327204634591232</eyebrow-url>
                </content>
                <source>
                  <service-provider>
                    <name>LINKEDIN</name>
                  </service-provider>
                </source>
                <author>
                  <id>BPEbxfpM2R</id>
                  <first-name>Sanjeev</first-name>
                  <last-name>Kumar</last-name>
                  <headline>Software Product Executive</headline>
                </author>
              </current-share>
              <picture-url>http://m.c.lnkd.licdn.com/mpr/mprx/0_OPQTE1630ohSyvukY19OEl6D1acmyvukyAtOElFO2DiY_AUXtvnSXAPrjQBl0tSe0Kkx59Jd42AX</picture-url>
              <api-standard-profile-request>
                <url>http://api.linkedin.com/v1/people/BPEbxfpM2R</url>
                <headers total="1">
                  <http-header>
                    <name>x-li-auth-token</name>
                    <value>name:lOuj</value>
                  </http-header>
                </headers>
              </api-standard-profile-request>
              <site-standard-profile-request>
                <url>http://www.linkedin.com/profile/view?id=177805&amp;authType=name&amp;authToken=lOuj&amp;trk=api*a3135321*s3210031*</url>
              </site-standard-profile-request>
            </person>
          </update-content>
          <is-commentable>true</is-commentable>
          <update-comments total="2">
            <update-comment>
              <id>167200648</id>
              <sequence-number>0</sequence-number>
              <comment>link??? this I guess is just the image and I can't locate the deck on slideshare</comment>
              <person>
                <id>6rTGNnqCPQ</id>
                <first-name>Aditya</first-name>
                <last-name>Yadav</last-name>
                <headline>India ATS/R&amp;D Head at SunGard</headline>
                <picture-url>http://m.c.lnkd.licdn.com/mpr/mprx/0_z0kCB3kstiEufzyrzV5gB_PHtF0ySnDrBOKjBCCsSGIut-VKMJNmJG9NyWx_al2pqpQyZLpt78lB</picture-url>
                <api-standard-profile-request>
                  <url>http://api.linkedin.com/v1/people/6rTGNnqCPQ</url>
                  <headers total="1">
                    <http-header>
                      <name>x-li-auth-token</name>
                      <value>name:RgbU</value>
                    </http-header>
                  </headers>
                </api-standard-profile-request>
                <site-standard-profile-request>
                  <url>http://www.linkedin.com/profile/view?id=5852477&amp;authType=name&amp;authToken=RgbU&amp;trk=api*a3135321*s3210031*</url>
                </site-standard-profile-request>
              </person>
              <timestamp>1380466550374</timestamp>
            </update-comment>
            <update-comment>
              <id>167220926</id>
              <sequence-number>1</sequence-number>
              <comment>Sorry. I think this link might be better - http://goo.gl/ntwp7J</comment>
              <person>
                <id>BPEbxfpM2R</id>
                <first-name>Sanjeev</first-name>
                <last-name>Kumar</last-name>
                <headline>Software Product Executive</headline>
                <picture-url>http://m.c.lnkd.licdn.com/mpr/mprx/0_OPQTE1630ohSyvukY19OEl6D1acmyvukyAtOElFO2DiY_AUXtvnSXAPrjQBl0tSe0Kkx59Jd42AX</picture-url>
                <api-standard-profile-request>
                  <url>http://api.linkedin.com/v1/people/BPEbxfpM2R</url>
                  <headers total="1">
                    <http-header>
                      <name>x-li-auth-token</name>
                      <value>name:lOuj</value>
                    </http-header>
                  </headers>
                </api-standard-profile-request>
                <site-standard-profile-request>
                  <url>http://www.linkedin.com/profile/view?id=177805&amp;authType=name&amp;authToken=lOuj&amp;trk=api*a3135321*s3210031*</url>
                </site-standard-profile-request>
              </person>
              <timestamp>1380475631959</timestamp>
            </update-comment>
          </update-comments>
          <is-likable>true</is-likable>
          <is-liked>false</is-liked>
          <num-likes>1</num-likes>
          <likes total="1">
            <like>
              <person>
                <id>WxEW_KY7GY</id>
                <first-name>Udayakumar</first-name>
                <last-name>Dhansingh</last-name>
                <headline>Development Architect at Informatica</headline>
                <picture-url>http://m.c.lnkd.licdn.com/mpr/mprx/0_FIUn3WxB6UscHwLR5wZd3IgBoZSveSkR527d3oxczOM5BdPUwDws7EIJXvDEIE5c6HMeaSTmdat9</picture-url>
              </person>
            </like>
          </likes>
        </original-update>
      </update-action>
     * */
}
